<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSgSendLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        // 医生id, ip, 时间,
        Schema::create('st_sg_send_log', function (Blueprint $table) {
            // uid, ip, status
            $table->increments('id');
            $table->integer('hospital_id')->default(0)->comment('医院id');
            $table->integer('uid')->default(0)->comment('医生id');
            $table->string('ip', 50)->default('')->comment('医生ip');

            $table->timestamp('created_at')->useCurrent()->comment('生成时间');
            $table->timestamp('updated_at')->useCurrent()->comment('更新时间');

            $table->engine = 'InnoDB';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('st_sg_send_log');
    }
}
